package panel;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.JPanel;

@SuppressWarnings("serial")
public class Box extends JPanel{

	/*window*/
	private int stateButtonExit;

	public void setStateButtonExit(int stateButtonExit) {
		this.stateButtonExit = stateButtonExit;
	}
	
	public void paintComponent(Graphics g) {

		Toolkit winTool = this.getToolkit();
		Image buffer = createImage(400, 500);
		Graphics bufferG = buffer.getGraphics();

		/*window*/
		bufferG.drawImage(winTool.getImage(".\\Images\\Dialog_Screen.png"), 0, 0, this);
		bufferG.drawImage(winTool.getImage(".\\Images\\Main_Exit"+stateButtonExit+".png"), 329, -44, this);

		g.drawImage(buffer, 0, 0, this);

		setOpaque(false);
		super.paintComponent(g);
	}
}
